# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=xdg-user-dirs-gtk
pkgver=0.10+9+g5b7efc6
pkgrel=3
pkgdesc="Creates user dirs and asks to relocalize them"
arch=(x86_64)
license=('GPL')
depends=('gtk3' 'xdg-user-dirs')
makedepends=('intltool' gnome-common git)
options=('!emptydirs')
url="https://www.gnome.org"
groups=('gnome')
_commit=5b7efc6fcb5f3de1aba6f8de5f3d90870fea6f8d  # master
source=("git+https://gitlab.gnome.org/GNOME/xdg-user-dirs-gtk.git#commit=$_commit"
        show-in-mate.patch)
sha256sums=('SKIP'
            'b71317c1b7ef5a303736787cbfc37f44e884ca2ec1ee8def22a970132254f827')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  patch -Np1 -i ../show-in-mate.patch
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --disable-more-warnings
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
